package com.vegetable.modules.service.quotation;

import com.baomidou.mybatisplus.extension.service.IService;
import com.vegetable.modules.entity.quotation.Quotation;
import com.vegetable.modules.entity.quotation.QuotationLog;
import com.vegetable.modules.entity.quotation.po.QuotationPO;
import com.vegetable.modules.entity.quotation.po.QuotationQueryPO;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

public interface IQuotationService extends IService<Quotation> {

    List<Quotation> quotationList(QuotationQueryPO param);

    int reloadQuotation();

    Quotation queryByCommodityIdAndSpecsId(Long commodityId, Long specsId);

    Quotation queryByCommodityNameAndArea(String commodityName, Long areaId);

    void saveQuotation(QuotationPO param);

    void updateQuotation(QuotationPO param);

    void updateQuotation(BigDecimal newPrice, Long quotationId, Date orderTime, BigDecimal numPrice);

    /**
     * 查询商品最新报价
     * @param commodityId
     * @return
     */
    QuotationLog queryQuotation(Long commodityId, Date queryDate);
}
